package com.gaohe.scp.mapper;

import java.util.List;
import com.gaohe.scp.domain.CsCarAssess;
import org.apache.ibatis.annotations.*;

/**
 * 车辆评估Mapper接口
 *
 * @author liuxiangyu
 * @date 2025-03-25
 */
@Mapper
public interface CsCarAssessMapper
{


    public List<CsCarAssess> selectCsCarAssessByCarId(Long assessId);

    /**
     * 查询车辆评估
     *
     * @param assessId 车辆评估主键
     * @return 车辆评估
     */
    public CsCarAssess selectCsCarAssessByAssessId(Long assessId);

    /**
     * 查询车辆评估列表
     *
     * @param csCarAssess 车辆评估
     * @return 车辆评估集合
     */
    public List<CsCarAssess> selectCsCarAssessList(CsCarAssess csCarAssess);

    /**
     * 新增车辆评估
     *
     * @param csCarAssess 车辆评估
     * @return 结果
     */
    public int insertCsCarAssess(CsCarAssess csCarAssess);

    /**
     * 修改车辆评估
     *
     * @param csCarAssess 车辆评估
     * @return 结果
     */
    public int updateCsCarAssess(CsCarAssess csCarAssess);

    /**
     * 删除车辆评估
     *
     * @param assessId 车辆评估主键
     * @return 结果
     */
    public int deleteCsCarAssessByAssessId(Long assessId);

    /**
     * 批量删除车辆评估
     *
     * @param assessIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCsCarAssessByAssessIds(Long[] assessIds);


//    @Select("SELECT assess_id, assess, file_url, assess_content " +
//            "FROM cs_car_assess " +
//            "WHERE car_id = #{carId}")
//    @Results({
//            @Result(property = "assessId",column = "assess_id"),
//            @Result(property = "assess",column = "assess"),
//            @Result(property = "fileUrl",column = "file_url"),
//            @Result(property = "assessContent",column = "assess_content")
//    })
//    List<CsCarAssess> selectCsCarAssessByCarId(Long carId);


    /**
     * 作者:张文豪
     * @param csCarAssess
     * @return 1
     */
    int updateAllCarInfo(CsCarAssess csCarAssess);


    int deleteCsCarAssessByCarId(Long carId);
}
